{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "from sklearn.linear_model import LinearRegression\n",
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "%matplotlib inline"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAHdpJREFUeJzt3X2QXNWZ3/HvI5jRtDQavSRjCAiPwCAje40ZuSSzYROP\nsGQv3hS4KilkZWtj8KxrKS02IS6vhfOHVKXCC664KCprlVB2AioXGgS7jo23SAQKmk0clz0D2Ib1\nSIQyK4GJ0bRtRVm2BiRWT/7oO6LV6umXe/t233v696nqUvft6e5zpjXPPfc5b+buiIhIuBZ0ugAi\nIpIuBXoRkcAp0IuIBE6BXkQkcAr0IiKBU6AXEQlc3UBvZmNmdtzMXqjy3JfM7IyZrSg7dreZvWxm\nh83sE60usIiINKeRFv1DwCcrD5rZSmATcKzs2BrgFmANcCOwy8ysNUUVEZE46gZ6d/8+cKLKU/cD\nX644djPwqLu/4+5HgZeB9UkLKSIi8cXK0ZvZTcBr7v5ixVOXAq+VPX49OiYiIh1yYbMvMLMC8FVK\naRsREcm4pgM98D5gFfDTKP++EnjezNZTasG/t+xnV0bHzmNmWmRHRCQGd2+q77PR1I1FN9z9b9z9\nYne/wt0vB34BDLv7DPAEsNnMes3scuBKYLJGYYO9bd++veNlUP1Uv26sX8h1c4/XPm5keOU+4AfA\najN71cxuq4zXZSeBaeAxYBp4EtjqcUsmIiItUTd14+7/us7zV1Q8/lPgTxOWS0REWkQzY1MyMjLS\n6SKkSvXLt5DrF3Ld4rJOZVbMTFkdEZEmmRmeUmesiIjklAK9iEjgFOhFRAKnQC8iEjgFehGRwCnQ\ni4gEToFe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4P4/a5NqRuOuzHQAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x2113584d240>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(100,)\n"
     ]
    }
   ],
   "source": [
    "#载入数据\n",
    "data = np.genfromtxt(\"data.csv\",delimiter = ',')\n",
    "x_data = data[:,0]\n",
    "y_data = data[:,1]\n",
    "plt.scatter(x_data,y_data) #scatter 画三散点图\n",
    "plt.show()\n",
    "print(x_data.shape)  #shape 查看矩阵或者数组的维数\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "LinearRegression(copy_X=True, fit_intercept=True, n_jobs=1, normalize=False)"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "x_data = data[:,0,np.newaxis]\n",
    "y_data = data[:,1,np.newaxis]\n",
    "model = LinearRegression()\n",
    "model.fit(x_data,y_data)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAEACAYAAAC9Gb03AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3XlwXOWZ7/HvY0tADDIxEEzM4rB6kROWZByWGJphSUxy\nDUndYU2GJUllmcSETDIxUGCRKe4AqVthwg13biZcxsmwzxTBEBbjgmYpi301so0DmM2xMsQGGnJZ\nZD/3j3Nkt1otqbvP6T5L/z5VKvU56uU9aunp9zzv877H3B0REcmvcUk3QEREmkuBXkQk5xToRURy\nToFeRCTnFOhFRHJOgV5EJOfGDPRmdpWZ9ZvZM2X7LjOzFWb2lJn9p5lNLPvZuWa2Ovz5sc1quIiI\n1KaWHv3VwOcr9i0But39AGA1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ZBWnE1+3r/XgFfd/bFw+z8JAn9ejm/QXOBxd38j\n3M7D8R0NvOju6919I8HYw6E0cGyt7NH/X6DP3f+5bN9i4Izw9unALZUPSjsz22lw1DucOHYMsIIc\nHBuAu59SGhb0AAAA30lEQVTn7nu4+17AycA97v414FZycHxmNiE808TMtiXI8z5Lft6/fuBVM9sv\n3HUU8Bw5Ob4ypxB0RAbl4fheAQ42s23MzAjeuz4aOLaW1NGb2WHA/QT/QB5+nQc8QsYnV7XTxDEz\nOwL4e3efl5fjM7M9CXpKTpDmuMbdL8nL8QGY2f7Ar4FO4EXgTGA8+Tm+CQTHsJe7l8J9uXj/wnLt\nk4EPgScJlpjpos5j04QpEZGc06UERURyToFeRCTnFOhFRHJOgV5EJOcU6EVEck6BXkQk5xToRURy\nToFeRCTn/j+Owgb/nLKhBwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<matplotlib.figure.Figure at 0x21136114048>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(x_data,y_data,'b.')\n",
    "plt.plot(x_data,model.predict(x_data),'r')\n",
    "plt.show()"
   ]
  }
 ],
 "metadata": {
  "anaconda-cloud": {},
  "kernelspec": {
   "display_name": "Python [Root]",
   "language": "python",
   "name": "Python [Root]"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.5.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
